﻿using Newtonsoft.Json;

namespace Discord.Param;

/// <summary>
/// 图片会说话调用参数
/// </summary>
public class DescribePayLoad : BasePayload
{
    [JsonProperty(PropertyName = "data")]
    public DescribePayLoadInfo Data { get; set; } = new();
}

public class DescribePayLoadInfo
{
    [JsonProperty(PropertyName = "version")]
    public string Version { get; set; } = "1118961510123847772";

    [JsonProperty(PropertyName = "id")]
    public string Id { get; set; } = "938956540159881230";

    [JsonProperty(PropertyName = "name")]
    public string Name { get; set; } = "describe";

    [JsonProperty(PropertyName = "type")]
    public int Type { get; set; } = 1;

    [JsonProperty(PropertyName = "options")]
    public List<DOptionsInfo> OptionList { get; set; } = new();

    [JsonProperty(PropertyName = "attachments")]
    public List<DAttachmentInfo> Attachments { get; set; } = new();
}

public class DOptionsInfo
{
    [JsonProperty(PropertyName = "type")]
    public int Type { get; set; } = 11;

    [JsonProperty(PropertyName = "name")]
    public string Name { get; set; } = "image";

    [JsonProperty(PropertyName = "value")]
    public int Value { get; set; }
}

public class DAttachmentInfo
{
    [JsonProperty(PropertyName = "id")]
    public string Id { get; set; } = "0";

    [JsonProperty(PropertyName = "filename")]
    public string FileName { get; set; } = "";

    [JsonProperty(PropertyName = "uploaded_filename")]
    public string UpLoadedFileName { get; set; } = "";
}